// 	Name: 05.c
//	Description: Chapter 5 project 5
//	Author: StableGenius
//	Date: 2020-05-07
//	Email: feng@dongfa.pro

#include <stdio.h>

int main(void){
	float income, tax;
	
	printf("Enter your income: ");
	scanf("%f", &income);
	
	if (income < 750.0f)
        tax = .01f * income;
    else if (income < 2250.0f)
        tax = 7.5f + .02f * (income - 750.0f);
    else if (income < 3750.0f)
        tax = 37.5f + .03f * (income - 2250.0f);
    else if (income < 5250.0f)
        tax = 82.5f + .04f * (income - 3750.0f);
    else if (income < 7000.0f) 
        tax = 142.5f + .05f * (income - 5250.0f);
    else
        tax = 230.0f + .06f * (income - 7000.0f);

    printf("tax: $%.2f\n", tax);

	return 0;
}
